/*
 * Copyright (C), 2002-2015, 苏宁易购电子商务有限公司
 * FileName: CmsMediaVo.java
 * Author:   Administrator
 * Date:     2015年4月13日 上午2:32:02
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.deco.domain.vo.sys;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 〈一句话功能简述〉<br>
 * 〈功能详细描述〉
 *
 * @author Administrator
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
public class CmsMediaVo implements Serializable {

    private static final long serialVersionUID = -8295260265871101472L;

    private Integer id;
    private Integer typeId;
    private String name;
    private String remarks;
    private Integer size;
    private Integer imgWidth;
    private Integer imgHeight;
    private String extension;
    private String relativePath;
    private String rootPath;
    private Timestamp createTime;

    private String typeFmt;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getImgWidth() {
        return imgWidth;
    }

    public void setImgWidth(Integer imgWidth) {
        this.imgWidth = imgWidth;
    }

    public Integer getImgHeight() {
        return imgHeight;
    }

    public void setImgHeight(Integer imgHeight) {
        this.imgHeight = imgHeight;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getRelativePath() {
        return relativePath;
    }

    public void setRelativePath(String relativePath) {
        this.relativePath = relativePath;
    }

    public String getRootPath() {
        return rootPath;
    }

    public void setRootPath(String rootPath) {
        this.rootPath = rootPath;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getTypeFmt() {
        return typeFmt;
    }

    public void setTypeFmt(String typeFmt) {
        this.typeFmt = typeFmt;
    }

    // add
    public Boolean getIsImg() {
        String imgExts = "jpg,jpeg,gif,png,bmp";
        return imgExts.indexOf(extension.toLowerCase()) > -1 ? true : false;
    }

    @Override
    public String toString() {
        return "CmsMediaVo{" +
                "id=" + id +
                ", typeId=" + typeId +
                ", name='" + name + '\'' +
                ", remarks='" + remarks + '\'' +
                ", size=" + size +
                ", imgWidth=" + imgWidth +
                ", imgHeight=" + imgHeight +
                ", extension='" + extension + '\'' +
                ", relativePath='" + relativePath + '\'' +
                ", rootPath='" + rootPath + '\'' +
                ", createTime=" + createTime +
                ", typeFmt='" + typeFmt + '\'' +
                '}';
    }
}
